package com.neu.cloudfactory.repository;

import com.neu.cloudfactory.bean.Tender.Tender;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface TenderRepository extends JpaRepository<Tender,Integer> {
    List<Tender> findAllByOrderid(Integer orderringid);
    List<Tender> findAllByFactoryid(Integer factoryid);
    Optional<Tender> findByFactoryidAndOrderid(Integer factoryid,Integer orderid);
    void deleteAllByOrderidAndStatusid(Integer orderid,Integer statusid);
}
